﻿<Window x:Class="TFlic.View.Popup.OrganizationPopup"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TFlic.View"
        xmlns:vm="clr-namespace:TFlic.ViewModel"
        
        mc:Ignorable="d"
        Title="BoardWindow" Height="300" Width="600"
        WindowStyle="None"
        WindowStartupLocation="CenterScreen"
        Background="Transparent"
        AllowsTransparency="True"
        MouseDown="Window_MouseDown">

    <Window.DataContext>
        <vm:OrganizationWindowViewModel/>
    </Window.DataContext>

    <Border CornerRadius="15">

        <Border CornerRadius="15"
            BorderThickness="5"
            Opacity="1">

            <Border.BorderBrush>
                <SolidColorBrush Color="#565656" Opacity="1"/>
            </Border.BorderBrush>
            <Border.Background>
                <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                    <GradientStop Color="#5F5F5F" Offset="0"/>
                    <GradientStop Color="#6A6A6A" Offset="0.25"/>
                    <GradientStop Color="#8E8E8E" Offset="0.5"/>
                    <GradientStop Color="#6A6A6A" Offset="0.75"/>
                    <GradientStop Color="#5F5F5F" Offset="1"/>
                </LinearGradientBrush>
            </Border.Background>

            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="25"/>
                    <RowDefinition/>
                </Grid.RowDefinitions>

                <Grid Grid.Row="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="25"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Сведения об организации"
                       FontSize="20"
                       Grid.Column="0"
                       VerticalAlignment="Center"
                       HorizontalAlignment="Center"
                       Margin="10,0,0,0"/>

                    <Button x:Name="BClose"  
                            Grid.Column="3" 
                            Click="BClose_Click"
                            Style="{DynamicResource CloseWindowButtonStyle}"
                            Template="{DynamicResource CloseWindowButtonTemplate}" Cursor="Arrow"/>
                </Grid>

                <Grid Grid.Row="1">

                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="100"/>
                        <ColumnDefinition Width="62*"/>
                        <ColumnDefinition Width="133*"/>
                        <ColumnDefinition Width="100"/>
                    </Grid.ColumnDefinitions>

                    <StackPanel Grid.Column="1"
                                Margin="0,50,0,50" Grid.ColumnSpan="2">

                        <TextBlock Text="Название" 
                                   FontSize="12" 
                                   FontWeight="Medium" 
                                   Margin="0,0,0,0"/>
                        <TextBox Grid.Column="1"
                                 Text="{Binding OrgName, UpdateSourceTrigger=PropertyChanged}"/>

                        <TextBlock Text="Описание" 
                                   FontSize="12" 
                                   FontWeight="Medium" 
                                   Margin="0,10,0,0"/>
                        <TextBox Grid.Column="1"
                                 Height="50"
                                 Margin="0,0,0,0"
                                 Text="{Binding OrgDescription, UpdateSourceTrigger=PropertyChanged}"/>

                        <StackPanel Orientation="Horizontal"
                                    HorizontalAlignment="Center">
                            <Button Name="Change"
                                Content="Изменить"
                                Margin="0,10,0,0"
                                    Width="150"
                                Style="{DynamicResource ButtonStyle}"
                                Template="{DynamicResource ButtonTemplate}"
                                Click="Change_Click"/>

                            <Button Name="Delete"
                                Content="Удалить"
                                Margin="10,10,0,0"
                                    Width="150"
                                Style="{DynamicResource ButtonStyle}"
                                Template="{DynamicResource ButtonTemplate}"
                                Click="Delete_Click"/>
                        </StackPanel>
                    </StackPanel>
                </Grid>
            </Grid>
        </Border>
    </Border>
</Window>